package class1.s2022350143028.controller;


import base.controller.OrdersBaseController;
import class1.s2022350143028.service.Impl.OrdersxyServiceImpl;

import java.util.Scanner;

public class OrdersController extends OrdersBaseController {


    public void main(){

        while(true){
            System.out.println("----------------------");
            System.out.println("0.返回首页");
            System.out.println("1.订单查询");
            System.out.println("2.订单录入");
            System.out.println("----------------------");

            OrdersxyServiceImpl orderimpl=new OrdersxyServiceImpl();

            Scanner sc = new Scanner(System.in);
            System.out.println("请输入你的选择");
            int choice = sc.nextInt();
            boolean flag=true;
            switch (choice){
                case 0:{
                    flag=false;
                    break;
                }
                case 1:{ //查询商品
                    orderimpl.getList();
                    break;
                }
                case 2:{ //商品录入
                    orderimpl.addOrders();
                    break;
                }

                }
            if(!flag)break;
        }
        return;
    }


}



